package org.example.web.fegin;

import com.yc.damai.entity.DmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Company 源辰信息
 *
 * @author navy
 * @date 2024/6/22
 * Email haijunzhou@hnit.edu.cn
 */
@FeignClient(value = "damai-user", fallback = UserDoImpl.class)
public interface UserDo {

    @RequestMapping("user")
    String user();

    @RequestMapping("add")
    int addNum(@RequestParam("a") int x, @RequestParam("b")int y);

    @RequestMapping("showName/{name}")
    String hello(@PathVariable String name);

    @RequestMapping("resetPwd")
    DmUser setPwd(@RequestBody DmUser user, @RequestParam String pwd);
}
